(function() {

this.codium = this.codium || {};
this.codium.panel = this.codium.panel || {};

this.codium.panel.Milestone = codium.panel.BasicPanel.extend(
{
	init : function() 
	{
		this._super();
		
		this.setIcon(this.libDir + "/img/icon/menuMilestone.png");
		this.setCaption("Project Milestone");
		
		this.pnlMilestone = new pasta.webgui.ContainerControl();
		this.pnlMilestone.setLeft(10);
		this.pnlMilestone.setTop(40);
		this.pnlMilestone.setWidth(this.getWidth() - (2 * this.pnlMilestone.getLeft()));
		this.pnlMilestone.setHeight(this.getHeight() - this.pnlMilestone.getTop() - this.pnlMilestone.getLeft());
		this.pnlMilestone.setBorderColor("#FFFFFF");
		this.pnlMilestone.setBgColor("#FEFEFE");
		this.pnlMilestone.setShadow("0px 2px 4px #000000");
		this.addControl(this.pnlMilestone);
		
			this.lblMilestoneCaption = new pasta.webgui.Label();
			this.lblMilestoneCaption.setLeft(5);
			this.lblMilestoneCaption.setTop(5);
			this.lblMilestoneCaption.setWidth(200);
			this.lblMilestoneCaption.setCaption("Project Milestones :");
			this.lblMilestoneCaption.font.setBold(true);
			this.lblMilestoneCaption.font.setSize(12);
			this.pnlMilestone.addControl(this.lblMilestoneCaption);
			
			this.shpMilestoneCaption = new pasta.webgui.Shape();
			this.shpMilestoneCaption.setLeft(this.lblMilestoneCaption.getLeft());
			this.shpMilestoneCaption.setTop(this.lblMilestoneCaption.getTop() + 20);
			this.shpMilestoneCaption.setWidth(this.pnlMilestone.getWidth() - (2 * this.shpMilestoneCaption.getLeft()));
			this.shpMilestoneCaption.setMode(2);
			this.pnlMilestone.addControl(this.shpMilestoneCaption);
	},	
	
	//-------------------- Service Event Handler --------------
	
	setWidth : function(data)
	{
		this._super(data);
		
		if (this.pnlMilestone != null)
		{
			this.pnlMilestone.setWidth(this.getWidth() - (2 * this.pnlMilestone.getLeft()));
			
				this.shpMilestoneCaption.setWidth(this.pnlMilestone.getWidth() - (2 * this.shpMilestoneCaption.getLeft()));
		}
	},
	
	setHeight : function(data)
	{
		this._super(data);
		
		if (this.pnlMilestone != null)
		{
			this.pnlMilestone.setHeight(this.getHeight() - this.pnlMilestone.getTop() - this.pnlMilestone.getLeft());
		}
	},
	
});

})();